var n = getApp();

Page({
    data: {
        showYK: !1,
        shade: !1,
        subsucc: !1,
        hasError: !1,
        resPhone: "",
        isYK: !1
    },
    inputChange: function(n) {
        this.setData({
            resPhone: n.detail.value
        }), 11 == n.detail.value.length && this.setData({
            isYK: !1
        });
    },
    submitYK: function(t) {
        var e = this, o = /^(13[0-9]|14[5|7]|15[0-9]|17[0|1|3|5|6|7|8]|18[0-9])\d{8}$/, a = e.data.resPhone;
        return "" != a && (o.test(a) ? (e.setData({
            hasError: !1
        }), void n.orderlogin({
            mobile: a,
            name: "小程序楼盘页预约"
        }).then(function(n) {
            200 == n.code && (e.setData({
                showYK: !1,
                subsucc: !0,
                isYK: !1
            }), setTimeout(function() {
                e.setData({
                    showYK: !1,
                    subsucc: !1
                }), wx.reLaunch({
                    url: "/pages/my/index"
                });
            }, 3e3));
        })) : (e.setData({
            hasError: !0
        }), !1));
    },
    onLoad: function(n) {},
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});